home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / misc / volume17 / calentool / part06 < prev    next >
Encoding:
Internet Message Format  |  1991-04-07  |  55.8 KB

  1. From: billr@saab.CNA.TEK.COM (Bill Randle)
  2. Newsgroups: comp.sources.misc
  3. Subject: v17i087:  calentool - day/week/month/year-at-a-glance SunView tool, Part06/23
  4. Message-ID: <1991Apr5.050657.1659@sparky.IMD.Sterling.COM>
  5. Date: 5 Apr 91 05:06:57 GMT
  6. Approved: kent@sparky.imd.sterling.com
  7. X-Checksum-Snefru: ad2bb7ea f615f654 dbb57163 5f40c505
  8.  
  9. Submitted-by: Bill Randle <billr@saab.CNA.TEK.COM>
  10. Posting-number: Volume 17, Issue 87
  11. Archive-name: calentool/part06
  12.  
  13. #! /bin/sh
  14. # This is a shell archive.  Remove anything before this line, then unpack
  15. # it by saving it into a file and typing "sh file".  To overwrite existing
  16. # files, type "sh file -c".  You can also feed this as standard input via
  17. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  18. # will see the following message at the end:
  19. #        "End of archive 6 (of 23)."
  20. # Contents:  Fixes2_1 calencheck.c calentool.1
  21. # Wrapped by billr@saab on Thu Mar 28 08:38:15 1991
  22. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  23. if test -f 'Fixes2_1' -a "${1}" != "-c" ; then 
  24.   echo shar: Will not clobber existing file \"'Fixes2_1'\"
  25. else
  26. echo shar: Extracting \"'Fixes2_1'\" \(12247 characters\)
  27. sed "s/^X//" >'Fixes2_1' <<'END_OF_FILE'
  28. X# $Header: Fixes2_1,v 2.1 89/05/09 14:26:54 billr Exp $
  29. XBugs fixed in version 2.1:
  30. X    - the -m option does not use a default userid
  31. X    :: fixed to default to userid that started calentool
  32. X
  33. X    - problems if no .appointment files exists
  34. X    :: calentool now prompts the user asking if he wishes to create
  35. X    :: a new .appointmnet file if it does not exist.
  36. X
  37. X    - if there is only one entry in the .appointments file, it
  38. X      can not be deleted.
  39. X    :: this is actually an attempt at safety checking, to avoid
  40. X    :: copying a zero length file over the original .appointments
  41. X    :: file (in case of file system full or whatever). A check
  42. X    :: for zero length file is still made, but due to the new format
  43. X    :: it should never happen.
  44. X
  45. X    - calentool dies if the input file is not in the expected
  46. X      format
  47. X    :: the whole input and output portions of the code have been
  48. X    :: rewritten with an eye towards making it more robust. Things
  49. X    :: like this should now print an error message, rather than
  50. X    :: just dumping core.
  51. X
  52. X    - When going from month display to week display, sometimes the
  53. X      week displayed is not the one that was selected.
  54. X    :: fixed.
  55. X
  56. X    - Calentool dies on OS 4.x machines when certain panel buttons
  57. X      are selected.
  58. X    :: argument list for some of the notify functions were incorrect.
  59. X    :: fixed.
  60. X
  61. XNew features in version 2.1:
  62. X    :: The user interface panel layout and button functionality
  63. X       has been redesigned (again) based on feedback from beta
  64. X       testers of version 2.0.  The new panel layout has the buttons
  65. X       grouped closer together (for ease of moving the mouse
  66. X       around) and is more consistent.  Most of the buttons also
  67. X       have menus accessible by pushing the right mouse button.
  68. X       "Current" and "Today" do not have menus.  When
  69. X       displaying a day or week, a particular day of that week
  70. X       can be displayed by selecting it from the menu under the
  71. X       "Day" button.  The "Next" and "Previous" buttons allow
  72. X       moving forward and back by days, weeks, months or years.
  73. X       The display type stays the same, so some options may be
  74. X       disabled, depending on display mode.  E.g., from a day
  75. X       display you can go to the same day next week, month or year
  76. X       (or the next day); but with a month display you can not
  77. X       go to the next week or day, only the next month or year.
  78. X       Clicking the left mouse button selects the next <whatever
  79. X       is currently displayed>.
  80. X       The Week, Month and Year buttons work much as they did in
  81. X       the 2.0 version, with the selection of larger timespans
  82. X       (e.g. week to month) keeping you in the same time period
  83. X       (e.g. same month) as you started.  When going to shorter
  84. X       time spans (e.g. month to week) the first event is displayed
  85. X       (e.g. first week in the month).  Current selects the
  86. X       current <whatever is displayed> that matches today.
  87. X       The Done button has been removed.  Use the frame menu
  88. X       close or quit options to close to an icon or quit the tool.
  89. X       A File button has been added to allow switching appointment
  90. X       files while calentool is running.
  91. X
  92. X    :: Today is grayed out in the year, month, week and day displays
  93. X       as a way to highlight it.
  94. X    
  95. X    :: The current date and time is displayed in the control panel.
  96. X       The default is to update the time every second.  Optionally,
  97. X       one can set the UPDATE_RATE to "minute" in ct.h (or the
  98. X       Makefile) to change the update rate to every minute - with
  99. X       no seconds field displayed.
  100. X
  101. X    :: A future appointment reminder is available to remind you
  102. X       every day for n days in advance about an appointment.  A
  103. X       popup frame is created to display the future appointments.
  104. X       This frame may be removed by selecting the "Done" button.
  105. X       Selecting one of the future appointments with the left
  106. X       mouse button moves you to that day and displays it.  (This
  107. X       can be handy for turning off the reminder, see below.)
  108. X    
  109. X    :: The repeating appointment facility has been expanded in
  110. X       capability.  In addition to the every year, month, day
  111. X       or repeat every n days appointments in 2.0, you can now
  112. X       specify a specific day of the week (e.g. every Monday).
  113. X       One can also tag that with specific weeks (e.g. 1st & 3rd
  114. X       Monday, Last Thursday).
  115. X
  116. X    :: In the day display a menu is available with the right
  117. X       mouse button to allow cut and paste operations on appointment
  118. X       entries, as well as modification of an appointment.
  119. X       When Modify is selected, a popup window appears to allow
  120. X       setting special attributes, such as repeating appointments
  121. X       and future reminders.  This should eliminate the need for
  122. X       ever having to manually edit the .appointments file.  Note
  123. X       that the cursor has to be in an appointment slot to get the
  124. X       menu.
  125. X    
  126. X    :: The .appointments file format also supports the use of
  127. X       #include files to include *non-editable* appointments
  128. X       (such as site specific holidays, etc.).  The format for
  129. X       this is:
  130. X        #include "file"
  131. X       or
  132. X        #include "/somepathname/file"
  133. X       Where the '#' *must* start in column 1 of the .appointments
  134. X       file.  If the "file" form is used, the file is prepended
  135. X       with the pathname used for the initial .appointments file.
  136. X       Include files are not nestable.  Using include files is the
  137. X       one case where manual editing of the .appointments file is
  138. X       still necessary. Included appointments are marked as read-
  139. X       only, they can not be deleted or modified. (You can still
  140. X       modify it my invoking calentool with the include file as
  141. X       the alternate appts file (-f option).)
  142. X
  143. X    :: Clicking the left mouse button on an existing appointment
  144. X       no longer deletes it.  You must use the "Cut" option of
  145. X       the popup menu to delete the appointment.
  146. X
  147. X    :: An optional date may be specified on the command line.  This
  148. X       will tell calentool to display that day when it starts up.
  149. X       The date format is pretty flexible - it will accept day
  150. X       names (e.g. Tue, Th, fr, MONDAY) or numeric dates in m/d/y
  151. X       format.  Valid forms are: dd (e.g. 27 => 27th of this month),
  152. X       mm/dd (e.g. 11/27 => Nov 27th of this year) and mm/dd/yy
  153. X       (e.g. 11/27/90 => Nov 27th, 1990).  Preface the date with
  154. X       the "-d" flag.
  155. X
  156. X    :: In the .appointments file, notes are now indicated by a "99"
  157. X       in the hour field, rather than "00".  This is in case
  158. X       someone works graveyard or wanted a 24-hour appointment
  159. X       display. The minutes field defaults to 00.  A "99" in the
  160. X       minutes field marks this note so that it will not show up
  161. X       in the month or year display.
  162. X
  163. X    :: The .appointments file is now one-based - i.e., months and
  164. X       days start at 1, rather than zero. This was an option in
  165. X       2.0, but is now standard in 2.1.  Calentool has the built-in
  166. X       capability to automatically convert existing .appointment
  167. X       files (see the README file).
  168. X    
  169. X    :: Support has been added for keeping outdated appointments in
  170. X       a seperate file of the form ".appointments.YY", where YY
  171. X       is the year.  This is controlled with the "-i" (include
  172. X       outdated appointments) and "-o" (save outdated appointments)
  173. X       flags.  If "-o" is specified on an appointment file with
  174. X       outdated entries, the save file(s) is(are) automatically
  175. X       created upon quiting the calentool program.  If "-o" is
  176. X       specified on the first time calentool is invoked on a
  177. X       version 1 file, the outdated appointment files are created
  178. X       when the file format is converted from version 1 to
  179. X       version 2.
  180. X    
  181. X    :: Calentool now allows you to temporarily delete a recurring
  182. X       appointment.  That is, if one has a meeting every Monday,
  183. X       except next Monday, then the appointment can be "deleted"
  184. X       (or hidden, actually) for that day only.  Recurring
  185. X       appointments that are deleted for a single occurance like
  186. X       this are the only ones that can be "undeleted".
  187. X    
  188. X    :: Calentool finally supports overlapping and mulitple
  189. X       appointments for a given time period.  When more than one
  190. X       appointment exists during a particular 30 minute timeslot,
  191. X       a "More" button appears to the right of the timeslot in
  192. X       the day display.  Clicking on this button with the left MB
  193. X       will show the next appointment in sequence.  To add another
  194. X       appointment on top of an existing appointment, click the
  195. X       left MB as normal and enter the new message.
  196. X    
  197. X    :: Support for common date directory.  If an included file
  198. X       has the form '#include <file>' then "file" is prepended
  199. X       with a library directory path determined from the
  200. X       /CalenTool//LibDir entry in the suntools
  201. X       defaults file (if it exists) or from the compile time
  202. X       specified name (DATELIB_DIR), which defaults to
  203. X       "/usr/local/lib/calentool".  Several date/event files
  204. X       are included in the distribution in the "dates" subdirectory.
  205. X    
  206. X    :: Day of year and days remaining in year added to the bottom
  207. X       of the day display.
  208. X    
  209. X    :: Appointment entries that are longer than the width of the
  210. X       display are normally displayed left justified.  When a
  211. X       keyboard character is typed into the timeslot the displayed
  212. X       message is right justified for editing.  A set of left and
  213. X       right arrows are also displayed to allow viewing the entire
  214. X       text of the message.
  215. X    
  216. X    :: An up-arrow cursor has been added to the currently selected
  217. X       day slot to show where text entry/deletion will take place.
  218. X    
  219. X    :: A sun and moon image have been added to the main control panel.
  220. X       When they are selected, interesting information about the sun
  221. X       and/or moon is displayed in a popup window.  Edit the riseset.h
  222. X       file to adjust for your specific lattitude and longitude.  This
  223. X       code is based on code from the riseset and moontool programs.
  224. X
  225. X    :: A "Print" button has been added to the main control panel to
  226. X       generate a raster or Postscript image file and send it to
  227. X       your printer.  This works for day, week and month displays.
  228. X       The day and week printouts are exact copies of what is seen on
  229. X       the screen. The month printout is in a different format.
  230. X       A menu is available with the Print button to allow changing
  231. X       the print command. The default print command is obtained
  232. X       from (in order): the suntool defaults file, the PRINTER
  233. X       environment variable and the #define for PRINT_CMD.
  234. X
  235. X    :: A "File" button has been added to the control panel to
  236. X       allow selecting a different appointments file after
  237. X       calentool has been started.
  238. X
  239. X    :: Calentool tries to auto-size itself based on the font in use.
  240. X       This should keep buttons, etc from overlapping when fonts
  241. X       other than screen.r.14 (default) are used.
  242. X    
  243. X    :: Once the tool is started, error messages are displayed in a
  244. X       popup window, rather than the console, if possible.
  245. X    
  246. X    :: The action of the middle mouse button in the day display
  247. X       has been changed. Point to the selected appt, push the middle
  248. X       button, drag the mouse to the termination timeslot and release
  249. X       the button.
  250. X    
  251. X    :: The "-t" option will display the current time below the icon
  252. X       when the tool is closed. The displayed time format and update
  253. X       rate is governed by the -u option (or UPDATE_INTERVAL #define).
  254. X    
  255. X    :: "-b" also puts a copy of the appt string in $HOME/.msgfile
  256. X       (in addition to the console) for use with nlock(1).
  257. X
  258. X    :: Today's day and month are now displayed on the bottom of
  259. X       the icon's calendar page.
  260. X    
  261. X    :: Popup window added to allow direct entry of a date to view.
  262. X       Selected by a menu entry under the "Current" button.
  263. X    
  264. X    :: Extended "Current" button menu to allow selecting current
  265. X       year, month, week or day, along with setting the date as
  266. X       noted above.
  267. X    
  268. X    :: Add "Save" button to the "File" frame that forces an update
  269. X       to the current appointments file.
  270. X    
  271. X    :: Change the defaults entry from an appointment directory to
  272. X       the actual appointment file.  New name is /CalenTool/Appts.
  273. X       This change was made to (hopefully) allow easier use of
  274. X       the tool when accessing multiple people's calendars when
  275. X       using the "File" frame.  /Lib entry changed to /LibDir.
  276. X    
  277. X    :: Create the tmp file in /tmp, with a name /tmp/apptsNNNNN
  278. X       where NNNNN is the pid.  The file name used to be
  279. X       .tmp.apts.NNNNN created in whatever directory the appointments
  280. X       file was found in.
  281. X
  282. X    :: Add "-w" option to turn off display of "Working!" message.
  283. X
  284. XAs always, bug reports and suggestions for improvements are encouraged.
  285. X
  286. X        -Bill Randle
  287. X        Tektronix, Inc.
  288. X        billr@saab.CNA.TEK.COM
  289. X        May 9, 1989
  290. END_OF_FILE
  291. if test 12247 -ne `wc -c <'Fixes2_1'`; then
  292.     echo shar: \"'Fixes2_1'\" unpacked with wrong size!
  293. fi
  294. # end of 'Fixes2_1'
  295. fi
  296. if test -f 'calencheck.c' -a "${1}" != "-c" ; then 
  297.   echo shar: Will not clobber existing file \"'calencheck.c'\"
  298. else
  299. echo shar: Extracting \"'calencheck.c'\" \(2774 characters\)
  300. sed "s/^X//" >'calencheck.c' <<'END_OF_FILE'
  301. X/*
  302. X * $Header: calencheck.c,v 2.3 91/03/27 16:44:57 billr Exp $
  303. X *
  304. X * calencheck.c - check for pending appts without the overhead
  305. X *          of the full blown calentool
  306. X *
  307. X * Copyright (C) 1989, 1991 Tektronix, Inc.
  308. X *    All Rights Reserved
  309. X * Permission is hereby granted to use and modify this file in source
  310. X * or binary form as long as it is not sold for profit and this copyright
  311. X * notice remains intact.
  312. X */
  313. X
  314. X/*
  315. X * define NO_DEFAULTS if you don't need info looked up in the .defaults
  316. X * file (saves memory by not linking in pixrect lib with SunOs > 4.0).
  317. X */
  318. X#include <stdio.h>
  319. X#include <sys/time.h>
  320. X#include <sys/file.h>
  321. X#include "ct.h"
  322. X
  323. Xint read_only = 1;        /* no modifications allowed */
  324. Xint n_tslots, otherfile = 0;
  325. Xint include_old = 0, save_old = 0;
  326. Xint new_entry = 0;
  327. Xint start_hour, end_hour, n_slots;
  328. Xstruct tm current, today, closedate;
  329. Xstruct tm First, Last;
  330. Xchar *progname, *othername;
  331. Xstruct dayslot *slots;
  332. Xint show_future = 1;
  333. Xint one_based = 0, version2 = 0;
  334. X
  335. Xmain(argc,argv)
  336. Xint argc;
  337. Xchar *argv[];
  338. X{
  339. X    int flag;
  340. X    extern char *optarg;
  341. X    char *rindex();
  342. X    
  343. X    if (progname = rindex(*argv, '/'))
  344. X        progname++;
  345. X    else
  346. X        progname = *argv;
  347. X
  348. X    start_hour = START_HOUR;
  349. X    end_hour = END_HOUR;
  350. X
  351. X    get_today();    /* initial day is today */
  352. X    current = today;
  353. X    
  354. X    while ((flag = getopt(argc, argv, "f:S:s:")) != EOF)
  355. X        switch (flag) {
  356. X            case 'f':   /* use this file */
  357. X            otherfile = 1;
  358. X            othername = optarg;
  359. X            break;
  360. X
  361. X            case 's':
  362. X            start_hour = atoi(optarg);
  363. X            if (start_hour > 23 || start_hour < 0)
  364. X                printf("start hour must be in range 0 - 23\n");
  365. X            break;
  366. X
  367. X            case 'S':
  368. X            end_hour = atoi(optarg);
  369. X            if (end_hour > 24 || end_hour < 1)
  370. X                printf("end hour must be in range 1 - 24\n");
  371. X            break;
  372. X
  373. X            case '?':
  374. X            default:
  375. X            fprintf(stderr, "usage: %s [-f <appt_file>]", progname);
  376. X            fprintf(stderr, " [-s <starthour>]");
  377. X            fprintf(stderr, " [-S <endhour>]\n");
  378. X            exit(1);
  379. X        }
  380. X
  381. X    err2console(TRUE);
  382. X
  383. X    /*
  384. X    ** setup number of slots and allocate memory for them
  385. X    */
  386. X    if ( start_hour >= end_hour )
  387. X        err_rpt("Start Hour must be less than Stop Hour", FATAL);
  388. X    n_tslots = (end_hour - start_hour) * 2;
  389. X    n_slots = n_tslots + N_NOTESLOTS;
  390. X    /* make room for n_slot dayslot entries and week entries */
  391. X    if ((slots = (struct dayslot *)malloc(n_slots* sizeof(struct dayslot))) == NULL)
  392. X        err_rpt("Can't get enough storage for day slots", FATAL);
  393. X
  394. X    do_files();
  395. X    closedate = today;
  396. X    check_calendar();
  397. X    for (;;) {
  398. X        /* only check appointments every TIME_OUT minutes */
  399. X        sleep(TIME_OUT);
  400. X        check_calendar();
  401. X    }
  402. X}
  403. X
  404. X/* some stubs required by routines in common.c not used by calencheck */
  405. Xnext_appt(i, j)
  406. Xint i, j;
  407. X{
  408. X}
  409. X
  410. Xdraw_day_appts()
  411. X{
  412. X}
  413. X
  414. Xdeactivate_slot(i, j)
  415. Xint i, j;
  416. X{
  417. X}
  418. X
  419. Xint
  420. Xput_aentry(f, a)
  421. XFILE *f;
  422. Xstruct appts_entry *a;
  423. X{
  424. X    return 0;
  425. X}
  426. X
  427. Xworking(i)
  428. Xint i;
  429. X{
  430. X}
  431. END_OF_FILE
  432. if test 2774 -ne `wc -c <'calencheck.c'`; then
  433.     echo shar: \"'calencheck.c'\" unpacked with wrong size!
  434. fi
  435. # end of 'calencheck.c'
  436. fi
  437. if test -f 'calentool.1' -a "${1}" != "-c" ; then 
  438.   echo shar: Will not clobber existing file \"'calentool.1'\"
  439. else
  440. echo shar: Extracting \"'calentool.1'\" \(37695 characters\)
  441. sed "s/^X//" >'calentool.1' <<'END_OF_FILE'
  442. X.\" $Header: calentool.1,v 2.8 91/03/27 17:01:33 billr Exp $
  443. X.\"
  444. X.TH CALENTOOL 1 "7 March 1991"
  445. X.ds Ps P\s-2OST\s+2S\s-2CRIPT\s+2\*R
  446. X.SH NAME
  447. Xcalentool - day/week/month/year-at-a-glance SunView tool (the Hacker's Almanac)
  448. X.SH SYNOPSIS
  449. X.B calentool
  450. X[
  451. X.B \-b
  452. X]
  453. X[
  454. X.B \-B
  455. X]
  456. X[
  457. X.B \-d
  458. X.I date
  459. X]
  460. X[
  461. X.B \-f
  462. X.I apptsfile
  463. X]
  464. X[
  465. X.B \-h
  466. X[
  467. X.IR A | a | c | i | l | j | s
  468. X]]
  469. X[
  470. X.B \-H
  471. X[
  472. X.IR A | a | c | i | l | j | s
  473. X]]
  474. X[
  475. X.B \-i
  476. X]
  477. X[
  478. X.B \-l
  479. X[
  480. X.IR 0 | 1
  481. X]]
  482. X[{
  483. X.B \-m
  484. X|
  485. X.B \-M
  486. X}
  487. X.I userid
  488. X]
  489. X[
  490. X.B \-o
  491. X]
  492. X[{
  493. X.B \-p
  494. X|
  495. X.B \-P
  496. X}{
  497. X.IR d | w | W | m
  498. X}]
  499. X[
  500. X.B \-r
  501. X]
  502. X[
  503. X.B \-t
  504. X]
  505. X[
  506. X.B \-u
  507. X.I int
  508. X]
  509. X[
  510. X.B \-w
  511. X]
  512. X[
  513. X.B \-z
  514. X]
  515. X[
  516. X.B \-5
  517. X]
  518. X[
  519. X.B \-6
  520. X]
  521. X[
  522. X[
  523. X.B \-7
  524. X]
  525. X[
  526. X.B \-12
  527. X]
  528. X[
  529. X.B \-24
  530. X]
  531. X[
  532. X.B \-e
  533. X]
  534. X[
  535. X.B \-E
  536. X]
  537. X[
  538. X.B \-T
  539. X.I printdev
  540. X]
  541. X[
  542. X.B \-s
  543. X.I starthour
  544. X]
  545. X[
  546. X.B \-S
  547. X.I stophour
  548. X]
  549. X[
  550. X.B \-N
  551. X.I int
  552. X]
  553. X[
  554. X.B \-x
  555. X.I int
  556. X]
  557. X[
  558. X.I sunview options
  559. X]
  560. X.SH DESCRIPTION
  561. X.I Calentool
  562. Xis a day/week/month/year-at-a-glance tool.  It is a
  563. Xwindow-based calendar; the only time you should have to type is
  564. Xwhen entering the text for an appointment.
  565. X.I Calentool
  566. Xprovides for both one-time and recurring appointments, as well as notes
  567. X(appointments or reminders with no associated time).  A period of advance
  568. Xwarning can be specified.  A visual warning (and optional auditory bell)
  569. Xare produced at the approach of a scheduled appointment.
  570. X.LP
  571. XBy employing appropriate options, this tool can be used to send reminders
  572. Xof appointments by
  573. X.IR mail (1),
  574. Xand to examine colleagues appointment schedules.  Daily, weekly and
  575. Xmonthly schedules
  576. Xcan be sent to a \*(Ps printer.  Outdated appointments can be sent
  577. Xautomatically to an archival file.  An extensive set of files containing
  578. Xcommemorative dates is included, as well as a library of routines which
  579. Xcomputes the dates of various holidays which do not fall on fixed days
  580. Xof the Gregorian calendar (including religious holidays and astronomical
  581. Xevents).  Lunar and solar almanacs are also included.
  582. X.LP
  583. XAlthough to take full advantage of
  584. X.I calentool
  585. Xyou should be operating within the SunView environment, the
  586. X.BR \-m ,
  587. X.BR \-M ,
  588. X.BR \-p ,
  589. X.BR \-P ,
  590. Xand
  591. X.B \-T
  592. Xoptions allow the Hacker's Almanac to be employed even from ordinary terminals.
  593. XThe accompanying utilities
  594. X.IR cal2ct (1L),
  595. X.IR month2ct (1L),
  596. Xand
  597. X.IR mt2ct (1L),
  598. Xtransform appointment files in
  599. X.IR calendar (1),
  600. X.IR month (1L),
  601. Xand
  602. X.IR monthtool (1L)
  603. Xformats to
  604. X.I calentool
  605. Xformat.
  606. X.LP
  607. XInstructions appear in the section DETAILED INSTRUCTIONS, which follows the
  608. XOPTIONS section.
  609. X.SH OPTIONS
  610. X.I Calentool
  611. Xaccepts standard
  612. X.I sunview
  613. Xcommand line options at the end of the command line.
  614. X.TP 15
  615. X.B \-b
  616. XWhen an appointment is pending, a bell character (along with the appointment
  617. Xmessage) is sent to the console; only one reminder is sent for each
  618. Xappointment.  Also, place a copy of the appointment text in the file
  619. X.IR $HOME/.msgfile .
  620. XThe text in this file is displayed by the screen lock program
  621. X.IR nlock (1L);
  622. Xnotifying passers-by of the user's current activity.
  623. X.TP
  624. X.B \-B
  625. XSimilar to
  626. X.B \-b
  627. Xexcept that the
  628. X.I calentool
  629. Xframe is opened instead of writing to the console.  If both features are
  630. Xdesired, both options may be specified.
  631. X.TP
  632. X.BI \-d \ date
  633. XOpen the calendar at the day
  634. X.IR date ,
  635. Xwhich may take on several formats:
  636. X.RS
  637. X.TP
  638. Xday of current week:
  639. XTue, Th, fr, MONDAY
  640. X.TP
  641. Xnumeric dates:
  642. XDD (day DD of current month, for example 27 for the 27th of this month)
  643. X.br
  644. XMO/DD (day DD of month MO, for example 11/12 for November 12)
  645. X.br
  646. XMO/DD/YY (day DD of month MO, year YY, for example 9/1/88 for 1 September 1988).
  647. X(If the
  648. X.B \-e
  649. Xor
  650. X.B \-E
  651. Xoptions are used, the date format is DD/MO and DD/MO/YY.
  652. X.TP
  653. Xrelative dates:
  654. X+n (n days from now, for example +1 for tomorrow)
  655. X.br
  656. X-n (n days ago, for example -1 for yesterday)
  657. X.RE
  658. X.TP
  659. X.B \-e
  660. XSet European (ISO) week display format (Monday through Sunday).  When 7 day
  661. Xweek display is set, the display shows the days Monday through Sunday,
  662. Xrather than Sunday through Saturday.  This also affects the month
  663. Xand year displays.  With this option the weeks are numbered according
  664. Xto ISO standard.
  665. X.TP
  666. X.B \-E
  667. XSet all European style options.  Currently, this includes:
  668. X.B \-24
  669. Xand
  670. X.BR \-e .
  671. X.TP
  672. X.BI \-f \ apptsfile
  673. XUse
  674. X.I apptsfile
  675. Xas the appointments file.  This is useful for seeing if
  676. Xother people on the net are free to attend a meeting.
  677. XIf everyone exports his appointments file (in a NFS environment) then
  678. Xpeople can plan appointments more effectively.
  679. X.IP
  680. XFile integrity can NOT be assured when this option is in use;
  681. Xif two people try to write to the same appointments file at the same time, the
  682. Xresult could be tragic.  Only the person whose schedule is
  683. Xdescribed by a particular appointments file should have write permission for
  684. Xthat file.
  685. X.TP
  686. X.BI \-h " char"
  687. XCompute and display holidays which do not fall on set dates of the Gregorian
  688. Xcalendar.  Notes appear in the day and week displays, and marks appear in
  689. Xthe month and year displays.  This option is followed by a single character
  690. Xwhich indicates which set of holidays is to be computed (the option can be
  691. Xinvoked multiple times on the command line).  The character codes for
  692. Xsupported date sets are:
  693. X.RS
  694. X.TP
  695. X.B A
  696. XUse all available date sets.  When this option is chosen, the time required
  697. Xto produce a new display increases.  It becomes long for the month display
  698. Xand extremely long for the year display.
  699. X.TP
  700. X.B a
  701. XAstronomical events (solstices and equinoxes).
  702. X.TP
  703. X.B c
  704. XChristian religious holidays.  These dates may be inaccurate for years
  705. Xprior to the advent of the Gregorian calendar in 1582.
  706. X.TP
  707. X.B i
  708. XIslamic religious holidays.  There are different conventions used by Muslim
  709. Xcountries to determine the dates in the Islamic calendar; the dates computed
  710. Xhere may differ by 1-2 days from the locally determined date.
  711. X.TP
  712. X.B l
  713. XLunar calendar (Chinese/Oriental) holidays (not yet implemented).
  714. X.TP
  715. X.B j
  716. XJewish religious holidays.  These may not be accurate for years after 2000.
  717. XAlso note that until recent centuries, the Jewish calendar was regulated (like
  718. Xthe modern Islamic calendar) by sightings of the crescent Moon, so that
  719. Xdates for previous years must be interpreted with caution.
  720. X.TP
  721. X.B s
  722. XUS Secular holidays.
  723. X.RE
  724. X.TP
  725. X.BI \-H " char"
  726. XIdentical to the
  727. X.B \-h
  728. Xoption, except that computed dates are displayed only in the day and week
  729. Xdisplays; the month and year displays are not marked for these dates.
  730. X.TP
  731. X.B \-i
  732. XInclude all outdated appointments files (files named
  733. X.IR .appointments.yy ,
  734. Xwhere
  735. X.I yy
  736. Xrepresents the last two digits of the appointment's year).
  737. X.TP
  738. X.BI \-l " int"
  739. XSet limit check for appointments.  If
  740. X.I int
  741. Xis 0 or missing, then only the appointment time slots are checked when
  742. Xdetermining whether to show a "no appointments" icon or a standard icon.
  743. XWhen
  744. X.I int
  745. Xis 1, the notes are also included in the check.
  746. X.TP
  747. X.BI \-m " userid"
  748. X.PD 0
  749. X.TP
  750. X.BI \-M " userid"
  751. X.PD
  752. XSend mail listing todays appointments to the user specified by
  753. X.I userid
  754. Xand exit.
  755. X.B \-m
  756. Xshows all notes, while
  757. X.B \-M
  758. Xdoes not show notes not marked for display in the month/year displays.
  759. XThis feature is useful when calentool is run from
  760. X.IR cron (1),
  761. Xto send yourself mail about today's appointments.  No mail is
  762. Xsent about today's appointments, if there are none.
  763. XThe
  764. X.B \-p
  765. Xand
  766. X.B \-P
  767. Xoptions may be used with these options to mail yourself a whole weeks
  768. Xworth of appointments, e.g.:
  769. X.I
  770. Xcalentool -Pw -m billr.
  771. X(Note: this option eliminates the need for the separate program,
  772. X.IR calenmail (1L),
  773. Xwhich was distributed with earlier releases of
  774. X.IR calentool ).
  775. XBy default, the output generated by the -[mM] command is
  776. Xin ASCII.  By using the
  777. X.B \-T
  778. Xoption, a different output format (e.g. \*(Ps) may be chosen.  Month
  779. Xoutput is in \*(Ps only.
  780. X.TP
  781. X.BI \-N " int"
  782. XSet the number of noteslots displayed to
  783. X.I int
  784. Xslots.  This is useful if the you increase the number of timeslots used
  785. Xand want to keep the overall display size down.
  786. X.TP
  787. X.B \-o
  788. XSave outdated appointments to an outdated
  789. Xappointments file (e.g., a file named
  790. X.IR .appointments.yy ,
  791. Xwhere
  792. X.I yy
  793. Xrepresents the last two digits of the appointments year).
  794. XAn appointment is considered outdated at the beginning of the next
  795. Xyear or, if the
  796. X.BI \-x n
  797. Xoption is specified,
  798. X.I n
  799. Xdays after the appointment.
  800. X.TP
  801. X.BI \-p " char"
  802. X.PD 0
  803. X.TP
  804. X.BI \-P " char"
  805. X.PD
  806. XPrint today's appointments and exit.  This is useful for reviewing
  807. Xappointments from an ordinary terminal or
  808. X.IR shelltool "(1)."
  809. XThe
  810. X.I d, w, W, m
  811. Xmodifiers select a printout of the current day, week, week or month,
  812. Xrespectively.  The
  813. X.I w
  814. Xoption prints a weeks worth starting at the beginning of the current week.
  815. X.I W
  816. Xprints a weeks worth starting at the current day.
  817. X.B \-p
  818. Xshows all notes, while
  819. X.B \-P
  820. Xdoes not show notes not marked for display in the month/year displays.
  821. XNo printout is provide of the current day's appointments, if there
  822. Xare none.
  823. XBy default, the output generated by the -[pP] command is
  824. Xin ASCII, except for month printouts where the default is \*(Ps.
  825. XBy using the
  826. X.B \-T
  827. Xoption, a different output format (e.g. \*(Ps) may be chosen.  Month
  828. Xoutput is in \*(Ps only.
  829. X.TP
  830. X.B \-r
  831. XOpen the calendar tool in read-only mode.
  832. XAppointments can be edited, but no changes will be saved.
  833. XThe tool's banner strip will contain the string "[Read Only]".
  834. XThis is particularly useful for inspecting other users' appointment files
  835. Xwith the
  836. X.B -f
  837. Xoption.
  838. X.TP
  839. X.BI \-s " starthour"
  840. XSet the start hour for the day and week displays to
  841. X.I starthour
  842. Xhour (0 to 23).
  843. X.TP
  844. X.BI \-S " stophour"
  845. XSet the stop (end) hour for the day and week displays to
  846. X.I stophour
  847. Xhour (1 to 24).  The end hour must be greater than the start hour.
  848. XIf the start stop span is large, you should change the default font
  849. Xto a smaller size font.  This can be done with the
  850. X.B \-Wi
  851. XSunView window option or by setting it explicity in the defaults file
  852. X(see below).
  853. X.TP
  854. X.B \-t
  855. XDisplay the current time below the
  856. X.I calentool
  857. Xicon (no further need for
  858. X.IR clocktool (1)).
  859. X.TP
  860. X.BI \-T " device"
  861. XUse
  862. X.I device
  863. Xas the output format for printing or mailing appointments.  The default
  864. Xis ASCII.  The only currently supported option for
  865. X.I device
  866. Xis
  867. X.B ps
  868. Xor
  869. X.B psc
  870. Xwhich specifies \*(Ps output instead.
  871. X.TP
  872. X.BI \-u " int"
  873. XUpdate the time at the interval of
  874. X.I int
  875. Xseconds.
  876. X.TP
  877. X.B \-w
  878. XDisplay the "Working!" message in the control panel during
  879. Xlengthy operations.  The cursor also changes to an hourglass.
  880. X.TP
  881. X.BI \-x " int"
  882. XExpire (delete) appointment file entries if they are older than
  883. X.I int
  884. Xdays old.  If
  885. X.B \-o
  886. Xis set, entries are moved from
  887. Xthe appointments file to the outdated appointments file.
  888. XAppointments in #include files and read only appointments are not
  889. Xexpired.  To expire included appointments,
  890. X.I calentool
  891. Xmust be run on the included file directly.
  892. X.TP
  893. X.B \-z
  894. XConvert appointments file used by earlier (pre 2.0) versions of
  895. X.I calentool
  896. Xto the format used by the current version.  This option should be invoked only
  897. Xonce, the first time an old format file is read by
  898. X.IR calentool .
  899. X.TP
  900. X.B \-5
  901. XDisplay only five days (Monday through Friday) in the week display.  This is
  902. Xuseful if the installer has set the default display format to 6 or 7 days.
  903. X.TP
  904. X.B \-6
  905. XDisplay six days (Monday through Saturday) in the week display.  This is
  906. Xuseful if the installer has set the default display format to 5 or 7 days.
  907. X.TP
  908. X.B \-7
  909. XDisplay all seven days in the week display.  This is useful if the installer
  910. Xhas set the default value to 5 or 6 days.
  911. XSundat through Saturday is the standard format.  Using the
  912. X.B \-e
  913. Xor
  914. X.B \-E
  915. Xoptions displays a Monday through Sunday format.
  916. XThe 7-day display is wider than the 5-day
  917. Xdisplay, allowing longer messages to be displayed on the day page.
  918. X.TP
  919. X.B \-12
  920. XDisplay time in a 12-hour AM/PM format whenever practical.  This is useful
  921. Xif the installer has set the default time format to 24-hour time.
  922. X.TP
  923. X.B \-24
  924. XDisplay time in a 24-hour format.  This is useful
  925. Xif the installer has set the default time format to 12-hour time.
  926. X.LP
  927. X.SH "DETAILED INSTRUCTIONS"
  928. X.SS "Examining the calendar"
  929. XWhen first opened, the tool displays the appointments for a single day (today
  930. Xif the
  931. X.B \-d
  932. Xoption has not been employed).  The day page for today is demarcated in gray.
  933. XEach appointment or reminder is shown at its start time in reverse video.
  934. XIf the appointment lasts longer than 30 minutes an arrow is drawn from
  935. Xthe starting timeslot to the end of the appointment.
  936. XIf advance warning of future appointments has been requested, a popup
  937. Xdisplay appears.  The day display containing a future appointment may be
  938. Xdisplayed if the future appointment is selected with the
  939. X.IR mouse-LB .
  940. XThe reminder popup may be removed permanently (during this
  941. X.I calentool
  942. Xsession) by selecting the
  943. X.B Done
  944. Xoption; if the
  945. X.B Keep
  946. Xoption is selected, the reminder window will reappear each time the current
  947. Xday page is displayed.
  948. X.LP
  949. XIf there are multiple appointments sharing a time slot, a
  950. X.B More
  951. Xbutton appears to the right of the time slot.  This may be toggled repeatedly
  952. Xto view each appointment in turn.  Any arrows for hidden appointments
  953. Xare drawn as
  954. X.I dashed
  955. Xlines to show all scheduled time at a glance.  As the
  956. X.B More
  957. Xbutton is toggled, the arrows change state such that the new active
  958. Xappointment has arrows drawna s solid lines and the previous appointment's
  959. Xarrows (if any) are now dashed.
  960. XIf appointment text is too wide for the
  961. Xday page, scroll buttons appear to the right of the text and may be used to
  962. Xview the text in its entirety.  When first displayed, all text is left
  963. Xjustified.
  964. X.SS "The control panel"
  965. XThe control subwindow contains various control buttons and todays date and
  966. Xtime.  View the current week, month, or year by employing
  967. Xthe
  968. X.I mouse-LB
  969. Xto select the
  970. X.BR Week ,
  971. X.BR Month ,
  972. Xor
  973. X.B Year
  974. Xpanel buttons.  Pushing the
  975. X.I mouse-RB
  976. Xin the
  977. X.BR Day ,
  978. X.BR Week ,
  979. X.BR Month ,
  980. Xor
  981. X.BR Year
  982. Xpanel buttons activates pull-down menus with appropriate selections (certain
  983. Xof the selections may be inactivated due to the current display mode).  The
  984. X.B Today
  985. Xpanel button redisplays today's day page.  In each of the four display modes,
  986. Xthe
  987. X.B Previous
  988. Xand
  989. X.B Next
  990. Xpanel buttons move backward or forward one day, week, month or year, as
  991. Xappropriate (maintaining the current display mode).  There are also pull-down
  992. Xmenus associated with these buttons, produced by selecting the
  993. X.I mouse-RB
  994. X(again, certain options may be inactivated according to the current display
  995. Xmode).  The
  996. X.B Current
  997. Xbutton displays the current day, week, month or year, depending upon the current
  998. Xdisplay mode.  A pull-down menu associated with the
  999. X.B Current
  1000. Xbutton allows selection of the current day, week, month, or year displays, or
  1001. Xdirect entry of a specific date for which a day page is to be displayed.
  1002. XThe
  1003. X.B Done
  1004. Xbutton closes the frame to an icon.  A pull-down menu associated with
  1005. Xthe
  1006. X.B Done
  1007. Xbutton allows selection of either closing the frame or exiting the tool.
  1008. X.SS "Week, month and year displays"
  1009. XIn the week display, the initial part of each appointment message is visible.
  1010. XIf there are overlapping appointments/notes, a
  1011. X.B More
  1012. Xbutton appears at the bottom of the day column, which prints a message
  1013. Xreminding the user to select the day display to be able to view all of the
  1014. Xappointments/notes.
  1015. XThe day strip for today, if present, is demarcated in gray.
  1016. XMove the cursor over any day of the week and select the
  1017. X.I mouse-LB
  1018. Xto view the indicated day display.
  1019. X.LP
  1020. XIn the month display, a triangular hatch-mark in the
  1021. Xupper right-hand corner of a day indicates an appointment.
  1022. XThe day box for today, if present, is demarcated in gray.
  1023. XMove the cursor over any day of the month and select the
  1024. X.I mouse-LB
  1025. Xto view the indicated day display.  Position the cursor
  1026. Xover the arrow to the left of a week and select the
  1027. X.I mouse-LB
  1028. Xto view the indicated week.
  1029. X.LP
  1030. XIn the year display, a reverse-video date indicates an appointment.
  1031. XToday's date, if present, is marked in gray.
  1032. XMove the cursor over a particular month and select the
  1033. X.I mouse-LB
  1034. Xto select the indicated month display.
  1035. X.LP
  1036. XThe pulldown menu actuated within the top control bar of the window
  1037. Xby selecting the
  1038. X.I mouse-RB
  1039. Xallows the tool to be closed, moved, terminated, etc.
  1040. X.SS "Lunar and Solar data"
  1041. XSelection of the Sun or Moon icons in the day display reveals
  1042. Xinformation about rising and setting times, lunar phases, local
  1043. Xtime, sidereal time, etc.  An abbreviated solar data display is shown
  1044. Xif the day currently being displayed is not today.
  1045. X.SS "Iconic warning of an appointment"
  1046. XWhen
  1047. X.I calentool
  1048. Xis in iconic form, the icon is inverted to a reverse video representation
  1049. Xprior to a scheduled appointment and remains inverted
  1050. Xfor the duration of the appointment.  The amount of advance warning given
  1051. Xis set by the
  1052. X.B modify
  1053. Xmenu, with a default of 10 minutes.
  1054. X.LP
  1055. XWhen there are no appointments or notes remaining for the current day,
  1056. Xan alternate icon with an empty page is displayed instead of the
  1057. Xstandard or reverse video icons.
  1058. XFor all icons, today's month and day of month are displayed at the
  1059. Xbottom of the icon's calendar page.
  1060. X.SS "Entering appointments"
  1061. XAppointments can only be entered in the day display.  The day display presents
  1062. Xa number of labeled time slots (generally 30 minute intervals) as well as a
  1063. X.I notes
  1064. Xsection at the end of the day page, to enter reminders not associated with a
  1065. Xspecific time.  To enter an appointment, position the cursor over the required
  1066. Xtime slot and press the
  1067. X.IR mouse-LB .
  1068. XThe slot is toggled from white to black, leaving the cursor positioned in the
  1069. Xslot; type appropriate descriptive text.  If the text exceeds the size of the
  1070. Xwindow, scroll buttons will appear to the right.  Typing new text into the
  1071. Xtime slot automatically right-justifies the text already present, so that the
  1072. Xnew text is appended.  To indicate the duration of any appointment, click the
  1073. X.I mouse-MB
  1074. Xin the initial time slot (any existing duration arrow will be deleted);
  1075. Xa vertical indicator arrow appears and follows the cursor.  Drag the cursor
  1076. Xto the location of the final time slot and release the button.
  1077. XThe SunView L6 and L8 keys (COPY/PASTE or PUT/GET) may be also be
  1078. Xused to paste the text from the shelf to an active appoinment slot
  1079. Xor from an appointment slot to the shelf.  When inserting a string
  1080. Xin calentool using PASTE the slot must be active first (i.e. the
  1081. X.I mouse-LB
  1082. Xmust have been pressed first.
  1083. X.SS "Changing an appointment"
  1084. XSelecting the
  1085. X.I mouse-RB
  1086. Xin the highlighted time slot produces a popup menu with the options
  1087. X.BR modify ,
  1088. X.BR cut ,
  1089. X.BR paste ,
  1090. X.BR copy ,
  1091. X.BR delete ,
  1092. Xand
  1093. X.BR undelete .
  1094. XTo delete the current appointment, storing it in a temporary buffer,
  1095. Xselect the
  1096. X.B cut
  1097. Xoption.  To copy the text of an appointment into the buffer without deleting
  1098. Xit, select
  1099. X.BR copy ,
  1100. XTo place the text of a buffer-stored appointment into a time slot, click the
  1101. X.I mouse-RB
  1102. Xin the new time slot, and then select the
  1103. X.B paste
  1104. Xoption.
  1105. X.LP
  1106. XTo delete the current appointment, select the
  1107. X.B delete
  1108. Xoption.  If the appointment in question is recurring, a special subwindow
  1109. Xappears which allows the user to delete (or move) every occurrence or
  1110. Xjust today's occurrence.  If the latter is selected, the
  1111. X.B undelete
  1112. Xoption is activated, which allows today's occurrence to be reinstated.
  1113. X.SS "Appointment modifiers"
  1114. XAn appointment may be further modified be selecting the
  1115. X.B modify
  1116. Xoption.  This causes an options subwindow to appear, in which the user
  1117. Xmay specify that the appointment is to be repeated every day, for selected
  1118. Xweeks of the month (first through fifth, last or every Monday thru
  1119. XFriday), every month, and/or every year.  Alternatively,
  1120. Xthe appointment may be repeated at a specified interval of days.  The user can
  1121. Xalso specify a period of days prior to the appointment for which an
  1122. Xadvance warning will be printed; how many times this appointment will be repeated;
  1123. Xand how many minutes ahead of the scheduled time the user should be
  1124. Xreminded about an appointment (default is 10 minutes).
  1125. XFor example, one could specify that a meeting is to occur
  1126. Xon the first and third Tuesday of the month, in perpetuity, by selecting
  1127. Xthe repeat options
  1128. X.BR "Selected Week" ,
  1129. X.BR "Every Month" ,
  1130. Xand
  1131. X.BR "Every Year" ,
  1132. Xas well as the selected week indicators
  1133. X.B 1st
  1134. Xand
  1135. X.BR 3rd .
  1136. XAfter selecting the appointment options, the user can select either
  1137. X.B Accept
  1138. Xor
  1139. X.B Abort
  1140. Xto close the options subwindow.
  1141. X.SS "Entering notes"
  1142. XEntering notes is similar to entering appointments, except that no duration
  1143. Xarrows can be appended, and the modify panel allows the user to indicate
  1144. Xwhether or not the note is to be used to mark the month and year displays,
  1145. Xor to be printed (or mailed) when the
  1146. X.B \-P
  1147. X(or
  1148. X.BR \-M )
  1149. Xoption is invoked.
  1150. X.SS "Printing appointments"
  1151. XThe
  1152. X.B Print
  1153. Xbutton prints a copy of the day, week, or month display.  Pressing the
  1154. X.I mouse-RB
  1155. Xover this button produces a popup menu which allows either a raster image or
  1156. Xa \*(Ps version of the current display to be printed.  A third option allows
  1157. Xmodification of the default print command.  The default print command is taken from
  1158. Xthe first provided by the following sources: the 
  1159. X.I $HOME/.defaults
  1160. Xfile, the
  1161. X.I PRINTER
  1162. Xenvironment variable, and the
  1163. X.I PRINT_CMD
  1164. Xvalue provided by the system manager at the time of installation.
  1165. XThe printer output can also be sent to a file instead of directly to
  1166. Xthe printer.
  1167. X.SS "Saving outdated appointments"
  1168. XAppointments are recorded in a file named
  1169. X.IR .appointments .
  1170. XIf the
  1171. X.B \-o
  1172. Xoption is in effect, at the end of a year all appointments for the
  1173. Xpast year are copied into a special file with a name
  1174. X.I <appts_file>.yy
  1175. X(where
  1176. X.I yy
  1177. Xcontains the final two digits of the past year).  These appointments are then
  1178. Xdeleted from the current appointments file.  If the
  1179. X.B \-x
  1180. Xand
  1181. X.B \-o
  1182. Xoptions are in effect, expired appointments are also copied to the outdated
  1183. Xfile, rather than being purged.
  1184. X.SS "Examining other appointment files"
  1185. XThe
  1186. X.B File
  1187. Xbutton displays a window in which an alternate
  1188. X.I .appointments
  1189. Xfile can be specified.  This is useful for maintaining multiple appointment
  1190. Xbooks or for examining colleagues' calendars.  The file can be made
  1191. Xread-only or read-write according to the toggle option, and a file name can
  1192. Xbe typed into the window.  The
  1193. X.B Accept
  1194. Xbutton
  1195. Xinitiates reading of the currently displayed file, while
  1196. X.B Done
  1197. Xcloses the window without further action.
  1198. XThe
  1199. X.B Original
  1200. Xbutton restores the original file name that calentool was invoke with.
  1201. XThe
  1202. X.B Reset
  1203. Xbutton undoes any filename changes that have been made prior to
  1204. Xselecting
  1205. X.BR Accept .
  1206. XThe
  1207. X.B Update
  1208. Xbutton updates the current appointments file with any changes made that
  1209. Xhave not yet been logged.
  1210. X.SH "FILE FORMAT"
  1211. XUsing an included file (see below) is the one instance where manual editing
  1212. Xof the
  1213. X.I .appointments
  1214. Xfile is still required (although one could use the window-based aids of
  1215. X.I calentool
  1216. Xto build such a file, by means of the
  1217. X.B \-f
  1218. Xoption, the include command must still be edited into the primary
  1219. Xappointment file).  The appointments file contains four types of lines:
  1220. X.br
  1221. X.nf
  1222. X    \fC# CalenTool V2 - DO NOT REMOVE THIS LINE
  1223. X    #include "file"
  1224. X    # <comment string>
  1225. X    YY MO DD HH MI AA [II] <WW> +RR %AA # \fImessage\fP
  1226. X.fi
  1227. X.SS Header line
  1228. XThe first line in an
  1229. X.I appointments
  1230. Xfile identifies the version of
  1231. X.I calentool
  1232. Xin use.  This line should never be removed.
  1233. X.SS Included appointment files
  1234. XA
  1235. X.B non-editable
  1236. Xappointments file (for example, one containing site specific holidays) can
  1237. Xbe included.  Three formats are possbile for specifying such a file:
  1238. X.br
  1239. X    #include "/pathname/file"
  1240. X.br
  1241. Xor
  1242. X.br
  1243. X    #include "file"
  1244. X.br
  1245. Xor
  1246. X.br
  1247. X    #include <file>
  1248. X.br
  1249. XIn the second case, the file will be prepended with the pathname used for the
  1250. Xappointments file.  In the last case, the included file is assumed to reside
  1251. Xin a system-wide library directory specified at the time of installation
  1252. X(see your system administrator).  The #
  1253. X.B must
  1254. Xstart in column 1 of the appointments file.  The first line of an included file
  1255. Xmust also have a header line.  Included files may not include other files.
  1256. X.SS Comment line
  1257. XA
  1258. X.I #
  1259. Xin column one (not followed by the string "include") indicates a comment;
  1260. Xthe rest of the line is ignored.
  1261. X.SS Appointment/Note entries
  1262. XAll fields are separated by at least one space character.
  1263. X.RS
  1264. X.SS Mandatory entries
  1265. XThe
  1266. X.I YY
  1267. Xfield is the year (00-99), the
  1268. X.I MO
  1269. Xfield is the month (1-12) and
  1270. X.I DD
  1271. Xis the day (1-31).  The
  1272. X.I DD
  1273. Xfield can also contain a two-character alphabetic string describing
  1274. Xa day of the week: Su, Mo, Tu, We, Th, Fr, Sa or MF (Monday thru Friday).
  1275. XThis feature is used in conjunction with wildcards (see below), and the
  1276. X.I [II]
  1277. Xfield, which must appear within square brackets, and which can contain the
  1278. Xdigits 1-5 and the letter L, separated by commas, to indicate the first
  1279. Xthrough fifth (or last) monthly occurrence of the specified day of the week.
  1280. X.I HH
  1281. Xand
  1282. X.I MI
  1283. Xare the starting hour (00-23) and
  1284. Xminutes (00 or 30).
  1285. XThe
  1286. X.I AA
  1287. Xfield is the number of arrow bars (additional 30 minute
  1288. Xtime slots) required.
  1289. X.SS Notes
  1290. XA
  1291. X.I HH
  1292. Xvalue of 99 indicates a note, rather than an appointment,
  1293. Xwith
  1294. X.I MI
  1295. Xdesignating whether presence of the note is to be shown (marked) in the month and year
  1296. Xpanels (00 indicates that it is to be marked, 99 indicates that it should not
  1297. Xbe marked).
  1298. X.SS Wildcards for recurring appointments/notes
  1299. XA double asterisk (**) can be used in place of the year, month and/or day
  1300. Xfields to indicate every year, month or day.
  1301. X.SS Optional entries
  1302. XThe
  1303. X.I [II]
  1304. Xfield appears within square brackets, and (if the DD field contains a
  1305. Xnumerical value) is taken to be an interval in days between recurring
  1306. Xappointments.  The
  1307. X.I <WW>
  1308. Xfield appears within broken brackets, and indicates the number of
  1309. Xdays of advance warning required.  The
  1310. X.I +RR
  1311. Xfield is preceded by a plus sign, and indicates the repetition count
  1312. Xfor a given appointment.  The
  1313. X.I %AA
  1314. Xfield is preceded by a percent sign, and indicates the number of minutes
  1315. Xin advance of an appointment the user should be reminded.  If this field
  1316. Xdoes not exist, the default value of 10 minutes is used.
  1317. X.SS Appointment text
  1318. XIf a # character appears in front of the text, it indicates that a recurring
  1319. Xappointment has been suppressed for that day.  A leading '\\' character
  1320. Xis prepended to a text entry that starts with special characters to
  1321. Xprevent the text from being misinterpreted as appointment options.
  1322. X.SS Example entries
  1323. XA meeting that occurs weekly at 0900 and lasts for 1 hour, starting on
  1324. XApril 1st, would be represented as:
  1325. X.br
  1326. X.nf
  1327. X    \fC88 04 01 09 00 01 [7]        Weekly status meeting\fP
  1328. X.fi
  1329. XSeveral other examples:
  1330. X.nf
  1331. X    \fC** 04 01 99 99 00            April Fool's Day
  1332. X    ** ** Tu 10 30 00 [1,3]      Meeting on 1st and 3rd Tues. of Month
  1333. X    ** ** 01 99 00 00 <1>        First day of every month, one day warning
  1334. X    88 05 ** 99 99 00            On vacation for entire month of May 1988
  1335. X    89 11 06 99 00 00 +4         SigFishing Conference
  1336. X    ** ** MF 17 00 00            Daily backups\fP
  1337. X.fi
  1338. X.RE
  1339. X.SH "SUPPLIED SPECIAL DATES FILES"
  1340. X.I Calentool
  1341. Xis supplied with a number of system-wide special dates files which may be
  1342. Xincluded in a user's
  1343. X.I .appointments
  1344. Xfile:
  1345. X.RS
  1346. X.TP 15
  1347. Xancient
  1348. XEvents celebrated in ancient times
  1349. X.TP
  1350. Xcan_holiday
  1351. XMajor Canadian holidays (holidays from work)
  1352. X.TP
  1353. Xceltic
  1354. XHolidays/events of interest to Celts
  1355. X.TP
  1356. Xcomputing
  1357. XEvents in the history of computing
  1358. X.TP
  1359. Xevents
  1360. XHistorical events (major and minor)
  1361. X.TP
  1362. Xgdead
  1363. XDates concerning the rock group Grateful Dead
  1364. X.TP
  1365. Xhawaii
  1366. XHistorical events pertaining to Hawaii
  1367. X.TP
  1368. Xliterature
  1369. XHistorical events pertaining to literature, newspapers and comics
  1370. X.TP
  1371. Xlives
  1372. XBiographical dates of note (births, deaths, weddings)
  1373. X.TP
  1374. Xlotr
  1375. XSpecial dates for fans of Tolkien's
  1376. X.I Lord of the Rings
  1377. X.TP
  1378. Xmovies
  1379. XHistorical events pertaining to motion pictures
  1380. X.TP
  1381. Xmovies
  1382. XHistorical events pertaining to the music world (both popular and traditional)
  1383. X.TP
  1384. Xradio
  1385. XHistorical events pertaining to radio
  1386. X.TP
  1387. Xsfo
  1388. XHistorical events pertaining to San Francisco, CA and the surrounding area
  1389. X.TP
  1390. Xspace
  1391. XDates of note in the history of the exploration of outer space
  1392. X.TP
  1393. Xsports
  1394. XDates concerning sports.
  1395. X.TP
  1396. Xtelevision
  1397. XDates concerning television programs and history of tv.
  1398. X.TP
  1399. Xusa_holiday
  1400. XMajor US holidays (holidays from work)
  1401. X.TP
  1402. Xusa_other
  1403. XMinor US/Canadian holidays
  1404. X.TP
  1405. Xusa_states
  1406. XUS holidays specific to selected states
  1407. X.TP
  1408. Xwitchcraft
  1409. XDates of interest to witches and warlocks
  1410. X.TP
  1411. Xworld
  1412. XHolidays from countries other than the US/Canada
  1413. X.RE
  1414. X.SH "ENVIRONMENT VARIABLES, INITIALIZATION FILES, AND COMPILATION OPTIONS"
  1415. X.LP
  1416. XBy default, the
  1417. X.I .appointments
  1418. Xfile employed by
  1419. X.I calentool
  1420. Xresides
  1421. Xin the users' home directory.  Alternatively, the environment variable
  1422. XCALENTOOL_DIR can be set to the full pathname of a directory where the
  1423. X.I .appointments
  1424. Xfile resides.
  1425. X.I Calentool
  1426. Xmust have write permission in the directory to be used.
  1427. X.LP
  1428. X.I Calentool
  1429. Xalso recognizes "/CalenTool/Appts", "/CalenTool/Font", "/CalenTool/BigFont",
  1430. X"/CalenTool/LibDir" and "/CalenTool/Printer"
  1431. Xentries in the
  1432. X.IR suntools (1)
  1433. Xinitialization file,
  1434. X.IR .defaults .
  1435. XThe "/CalenTool/Appts" entry, if it exists, is used instead of the CALENTOOL_DIR
  1436. Xor HOME environment variables when searching for the
  1437. X.I .appointments
  1438. Xfile.  "/CalenTool/Appts" should be the full pathname of the appointments
  1439. Xfile (e.g. /usr/local/lib/calentool/billr.appts).  [Useful if everyone's
  1440. Xappointment files are NFS'd from a common directory.]
  1441. XThe normal font (by default, the default system font) may be changed
  1442. Xby use of the "/CalenTool/Font" entry.  The
  1443. X.IR suntools (1)
  1444. X.B \-Wt
  1445. Xoption will override the entry in the
  1446. X.I .defaults
  1447. Xfile.
  1448. XThe default large font (gallant.r.10) may be changed by use of
  1449. Xthe "/CalenTool/BigFont" entry.
  1450. XThe "/CalenTool/LibDir" entry overrides the compile time default directory
  1451. Xfor files specified with the
  1452. X.I #include <file>
  1453. Xappointment file entry (such as the special date files mentioned
  1454. Xabove).  The "/CalenTool/Printer" entry overrides the compile time
  1455. Xdefault and PRINTER environment variable for the printer name.
  1456. X.LP
  1457. XCompile time options allow modification of the start and ending year for the
  1458. Xyear pull-down menu, and various parameters defining the display.
  1459. X.SH FILES
  1460. X.TP 30
  1461. X$HOME/.appointments
  1462. Xdefault appointments file
  1463. X.TP
  1464. X$HOME/.defaults    
  1465. X.IR suntools (1)
  1466. Xdefaults initialization file
  1467. X.TP
  1468. X/tmp/appts*
  1469. Xdefault temporary appointments file, while active
  1470. X.TP
  1471. X$HOME/.msgfile
  1472. Xmessage file (containing current appointment) for
  1473. X.IR nlock (1L)
  1474. Xprogram
  1475. X.TP
  1476. X/usr/local/lib/calentool
  1477. Xdefault directory containing special date inclusion files
  1478. X.TP
  1479. X/usr/lib/defaults/CalenTool.d
  1480. Xfile specifying system-wide alternate fonts and directories; such information may also be appended to a user's
  1481. X.I $HOME/.defaults
  1482. Xfile
  1483. X.TP
  1484. X/usr/tmp/calentool.ps
  1485. Xfile used when \*(Ps printer File Only output is selected
  1486. X.TP
  1487. X/usr/tmp/calentool.ras
  1488. Xfile used when raster printer File Only output is selected
  1489. X.SH "SEE ALSO"
  1490. Xcal(1), cal2ct(1L), calencheck(1L), calendar(1), clocktool(1), cron(8),
  1491. Xmail(1), month(1L), monthtool(1L), month2ct(1L), mt2ct(1L),
  1492. Xnlock(1L), suntools(1)
  1493. X.SH REFERENCES
  1494. XAn excellent compendium which describes basic terminology of time measurement,
  1495. Xmethods of astronomical computation, and the convoluted history of calendars:
  1496. X.IP ""
  1497. XThe Nautical Almanac Offices of the United Kingdom and the United States of
  1498. XAmerica, \fIExplanatory Supplement to the Astronomical Ephemeris and the
  1499. XAmerican Ephemeris and Nautical Almanac\fP, Her Majesty's Stationery Office,
  1500. XLondon, 1961 (reprinted with amendments, 1977).
  1501. X.LP
  1502. XThe best single source for practical computations of solar and lunar data: 
  1503. X.IP ""
  1504. XJean Meeus, \fIAstronomical Formulae for Calculators\fP, \fIMonografieen
  1505. Xover Astronomie en Astrofysica\fP, Volkssterrenwacht Urania V.Z.W.,
  1506. XMattheessensstraat 62, B 2540 Hove, Belgium, Vereniging voor Sterrenkunde
  1507. XV.Z.W., Ringlaan 3, B 1180 Brussel, Belgium, Vol. 4, Derde Druk, October 1980.
  1508. X.LP
  1509. XOther helpful references for astronomical computations:
  1510. X.IP ""
  1511. XEric Burgess, \fICelestial BASIC\fP, Revised Edition, Sybex, 1985 (cookbook
  1512. Xoriented, many algorithms hard to dig out of turgid BASIC).
  1513. X.IP ""
  1514. XPierre Bretagnon and Jean-Louis Simon, \fIPlanetary Programs and Tables
  1515. Xfrom -4000 to +2800\fP, Willmann-Bell, 1986 (for utmost accuracy in
  1516. Xplanetary computations).
  1517. X.LP
  1518. XA non-scholarly work with easily implemented algorithms for computation of
  1519. XChristian and Jewish holidays and (an approximation to) the Islamic New Year:
  1520. X.IP ""
  1521. XWolfgang Alexander Schocken, \fIThe calculated confusion of calendars;
  1522. Xpuzzles in Christian, Jewish and Moslem calendars\fP, 1st Ed., Vantage Press,
  1523. XNew York, 1976.
  1524. X.LP
  1525. XUseful tables and additional information about the Islamic calendar:
  1526. X.IP ""
  1527. XG. S. P. Freeman-Grenville, \fIThe Muslim and Christian Calendars\fP,
  1528. XOxford University Press, London, 1963.
  1529. X.IP ""
  1530. XF. R. Unat, \fIHicri Tarihleri\fP, Turktarih Kurumu Basimevi, Ankara, 1959 (Turkish).
  1531. X.IP ""
  1532. XU. V. Tsybulsky, \fICalendar of Middle Eastern Countries\fP, Nauka
  1533. XPublishing House, Moscow, 1979 (English).
  1534. X.LP
  1535. XInformation (regrettably, not at all current) about Japanese holidays:
  1536. X.IP ""
  1537. XW. H. Erskine, \fIJapanese Festival and Calendar Lore\fP,
  1538. XKyo Bun Kwan, Tokyo, 1933.
  1539. X.SH "CALLING ALL HACKERS"
  1540. XPlease help extend the special dates files and date computation library
  1541. X(only carefully verified dates and algorithms, please!).  In particular, it
  1542. Xwould be splendid if someone would expand the range of astronomical
  1543. Xcomputations, which currently include only the equinoxes and solstices;
  1544. Xone could add dates/times of the major meteor showers, planetary risings and
  1545. Xsettings, etc.  Perhaps a sailing buff could build in high/low tide estimations.
  1546. XThe lunar calendar date computation library remains to be completed.
  1547. XThere are many other historical and contemporary calendrical systems we have
  1548. Xoverlooked (Egyptian, Armenian, Babylonian, Greek, Julian, Indian, and Russian,
  1549. Xas well as ecclesiatical calendars such as the Alexandrian).  The present dates
  1550. Xlibrary provides useful calendrical computations not currently exploited by
  1551. X.IR calentool ,
  1552. Xsuch as determining the number of days, or weekdays, or Mondays
  1553. Xbetween two dates.  Perhaps a third icon could be placed next to those for
  1554. Xthe solar and lunar almanacs, which would open a calendrical computation window.
  1555. XIt would be very useful if someone would write a
  1556. X.IR curses (3X)
  1557. Xbased front-end for
  1558. X.I calentool
  1559. Xformat date files for those not using
  1560. X.IR suntools (1).
  1561. XAn efficient way of doing this might be to merge
  1562. X.I calentool
  1563. Xwith the excellent
  1564. X.IR Dates (1L)
  1565. Xprogram of Dain Samples (samples@dougfir.berkeley.edu).
  1566. X.LP
  1567. XAn XView version of
  1568. X.I calentool
  1569. Xis also available.
  1570. X.LP
  1571. XMail suggestions, corrections, and additions for the Hacker's Almanac to
  1572. XBill Randle (billr@saab.CNA.TEK.COM).
  1573. X.SH BUGS
  1574. XWithout a doubt, but hopefully pretty minor.
  1575. X.SH CAUTIONS
  1576. XNote that the dates computed here are for the Gregorian calendar, which
  1577. Xwas a modification of the Julian calendar first introduced in 1582.
  1578. XCountries have adapted this system as recently as 1927 (Turkey), and in
  1579. Xsome countries it is used as a civil calendar in co-existence with a separate
  1580. Xindigenous calendar system.  Apply caution in using computed dates for
  1581. Xnon-recent years and non-European countries.
  1582. X.SH AUTHORS
  1583. XThe original version of
  1584. X.I calentool
  1585. Xwas contributed to the Sun User Group tape (17 April 1987) by
  1586. XPhilip Heller (Sun Microsystems, heller%terrapin@sun.COM).  Sun Microsystems
  1587. Xowns this program, but has no interest in maintaining it.
  1588. X.LP
  1589. XExtensive corrections and additions have been executed by
  1590. XBill Randle (Tektronix, Inc., billr@saab.CNA.TEK.COM); it is likely that
  1591. XPhil Heller would recognize little of the current program!
  1592. XR. P. C. Rodgers (rodgers@maxwell.mmwb.ucsf.edu, School of Pharmacy,
  1593. XUniversity of California, San Francisco) performed extensive beta
  1594. Xtesting, made numerous design suggestions, and contributed the holiday
  1595. Xcomputation library, icons, manual pages, and special dates files.  The initial
  1596. Xset of special dates files were modified from earlier net postings contributed
  1597. Xby Rich Kulawiec (rsk@boulder.Colorado.EDU) and
  1598. XDick Wexelblat (...decvax!ittvax!wxlvax!rlw), assisted by the following
  1599. Xcontributors known only by their network addresses:
  1600. X(ittvax!decvax!harpo!eagle!mhuxl!ihnp4!ihuxw!pector),
  1601. X(ittvax!bunker!dick),
  1602. X(decvax!sii!mem),
  1603. X(ittvax!decvax!bellcore!yquem!psl),
  1604. X(seismo!rochester!rocksvax!sunybcs!colonel),
  1605. Xand
  1606. X(decvax!seismo!rochester!ritcv!ccieng5!ccieng6!wla),
  1607. Xin addition to others whose identifications have been lost (speak up!).
  1608. XMore dates were obtained from "Today in History" by Robert Heckendorn
  1609. Xat Hewlett-Packard in Fort Collins, Colorado (robert@fc.hp.com) for
  1610. Xwhich the conversion to calentool format was done by Larry W. Virden
  1611. X(lwv27%cas.BITNET@CUNYVM.CUNY.Edu).
  1612. X.LP
  1613. XWe thank Dr. Omar Afzal of Cornell University (Chairman of the Committee
  1614. Xfor Crescent Observation) for his help in implementing the Islamic date
  1615. Xcomputations.
  1616. XThe lunar computations were adapted from a network posting of John Walker
  1617. Xof Autodeck, Inc. (Sausalito, CA, sun!acad!kelvin), the solar computations
  1618. Xwere adapted from a network posting of Marc T. Kaufman (Los Altos, CA),
  1619. Xthe raster to \*(Ps conversion was adapted from a network posting
  1620. Xby Glenn Boysko of Case Western Reserve University and the pcal code
  1621. Xfor printing the pretty month calendar was adapted from a network
  1622. Xposting by Ken Keirnan of Pacific Bell.
  1623. X.LP
  1624. XPaul Blumstein (Citicorp/TTI, paulb@harley.tti.COM),
  1625. XMark Feblowitz (GTE Laboratories, mdf0%shemesh@gte.COM), 
  1626. XDennis Calkins (Teradata Corp., tdat!dc1@suntzu.sun.com),
  1627. XHakan Kallberg (Simulina AB, hk@simulina.se),
  1628. XBaron O.A. Grey (UCLA, baron@lanai.cs.ucla.edu),
  1629. XMatt Landau (BBN Laboratories, mlandau@bbn.COM),
  1630. XDavid St. Pierre (Pacific Bell, david@pbsaint.PacBell.COM),
  1631. XCasey Leedom (Lawrence Livermore Laboratories, casey@lll-crg.llnl.GOV),
  1632. Xand Alfred Correira (UniSQL, Inc. alfred@unisql.uucp)
  1633. Xalso provided useful suggestions, patches and feedback on previous releases,
  1634. Xas did many others.
  1635. X.\" end of man page
  1636. END_OF_FILE
  1637. if test 37695 -ne `wc -c <'calentool.1'`; then
  1638.     echo shar: \"'calentool.1'\" unpacked with wrong size!
  1639. fi
  1640. # end of 'calentool.1'
  1641. fi
  1642. echo shar: End of archive 6 \(of 23\).
  1643. cp /dev/null ark6isdone
  1644. MISSING=""
  1645. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 ; do
  1646.     if test ! -f ark${I}isdone ; then
  1647.     MISSING="${MISSING} ${I}"
  1648.     fi
  1649. done
  1650. if test "${MISSING}" = "" ; then
  1651.     echo You have unpacked all 23 archives.
  1652.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1653. else
  1654.     echo You still need to unpack the following archives:
  1655.     echo "        " ${MISSING}
  1656. fi
  1657. ##  End of shell archive.
  1658. exit 0
  1659.  
  1660. exit 0 # Just in case...
  1661. -- 
  1662. Kent Landfield                   INTERNET: kent@sparky.IMD.Sterling.COM
  1663. Sterling Software, IMD           UUCP:     uunet!sparky!kent
  1664. Phone:    (402) 291-8300         FAX:      (402) 291-4362
  1665. Please send comp.sources.misc-related mail to kent@uunet.uu.net.
  1666.